package org.road0329.dlt698.tools;

import org.road0329.dlt698.axdr.SubChoiceAppUnit;

public enum ResultCode {
    SUCCESS(0),
    EMPTY_ERROR(1),
    ILLEGAL_ERROR(2),
    MODE_NOT_MATCH(3);

    private final int code;

    ResultCode(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public static ResultCode getEnumByValue(int value) {
        for (ResultCode item : ResultCode.values()) {
            if (value == item.getCode()) {
                return item;
            }
        }
        return null;
    }
}
